Repository navigation
docs(0.14): document native asset vault key/value encoding - #371
BrianSeong99 merged 3 commits into
Conversation
BrianSeong99
left a comment
There was a problem hiding this comment.
One correctness issue before approval.
|
|
||
| | Kind | Value word | | ||
| | --- | --- | | ||
| | Fungible | `[amount, 0, 0, 0]` — `amount ≤ 2⁶³−1` | |
There was a problem hiding this comment.
P1: The maximum fungible amount in v0.14.6 is 2⁶³−2³¹, not 2⁶³−1. Could we update this row so it matches FungibleAsset::MAX_AMOUNT and FUNGIBLE_ASSET_MAX_AMOUNT?
There was a problem hiding this comment.
Good catch — updated both places (the vault ASSET_VALUE table row and the earlier fungible-asset prose) to 2⁶³−2³¹, matching FungibleAsset::MAX_AMOUNT / FUNGIBLE_ASSET_MAX_AMOUNT (0x7fffffff80000000).
|
Addressed @BrianSeong99's P1: fungible max amount is now documented as `2⁶³−2³¹` (not `2⁶³−1`) in both the prose and the `ASSET_VALUE` table, matching `FungibleAsset::MAX_AMOUNT` / `FUNGIBLE_ASSET_MAX_AMOUNT`. |
|
@BrianSeong99 — P1 max-amount fix ( |
|
@BrianSeong99 — gentle bump: P1 max-amount fix is in. Still mergeable/CLEAN if you have a moment for re-review. |
|
The maximum-amount correction looks good. Two documentation points still need adjusting before merging:
Please also align the older NFT layout/size wording with the updated section so the page is internally consistent. |
Add the ASSET_KEY / ASSET_VALUE layout for fungible and non-fungible assets, including the callback flag in faucet_id_suffix, and align the create_non_fungible_asset Inputs row with enable_callbacks.
Align the vault encoding table and fungible asset prose with FungibleAsset::MAX_AMOUNT / FUNGIBLE_ASSET_MAX_AMOUNT (0x7fffffff80000000).
Address BrianSeong99 review on 0xMiden#371: callback flags gate fungible merging, NFT vault keys are not 1:1 with SMT leaves, and older layout/size wording now matches the Encoding section.
|
Thanks @BrianSeong99 — addressed both points (and aligned the older Type/size wording with the Encoding section):
Ready for another look whenever you have a moment. |
af9c2fe to
699e419
Compare
|
@BrianSeong99 — gentle bump for re-review. The NFT leaf / fungible callback-flag / layout consistency fixes from your Oct 5 notes are on the tip; PR is CLEAN against |
|
@BrianSeong99 — gentle bump for re-review. The NFT leaf / fungible callback-flag / layout consistency fixes from your Oct 5 notes are still on the tip; PR remains CLEAN against |
|
Thank you for the contribution! |
|
Thanks @BrianSeong99 — appreciate the review and the merge! |
Summary
ASSET_KEY/ASSET_VALUElayout (fungible vs non-fungible, callback flag infaucet_id_suffix) underversioned_docs/version-0.14/reference/protocol/asset.md#encoding.create_non_fungible_assetInputs with the fungible helper (enable_callbacksfirst) inprotocol_library.md.#encoding.Test plan
AssetVaultKey::to_word()on the v0.14.6 tag